using NodeCanvas.Framework;
using ParadoxNotion.Design;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class SetBoneItemActive : AIBaseNode
    {
        [RequiredField]
        public BBParameter<string> itemName;
        public BBParameter<bool> active = true;

        protected override void OnExecute()
        {
            BoneItemController boneItemController = _entity.viewer.boneItemController;
            if (boneItemController)
            {
                boneItemController.SetBoneItemActive(itemName.value,active.value);
                EndAction(true);
            }
        }
    }
}